package ATM;

public class Account {
    private String cardID; //卡号
    private String name;  //姓名
    private char gender;  //性别
    private String passworld;  //密码
    private double balance;  //余额
    private double limit;  //限额

    public Account() {
    }

    public Account(String cardID, String name, char gender, String passworld, double balance, double limit) {
        this.cardID = cardID;
        this.name = name;
        this.gender = gender;
        this.passworld = passworld;
        this.balance = balance;
        this.limit = limit;
    }

    public String getCardID() {
        return cardID;
    }

    public void setCardID(String cardID) {
        this.cardID = cardID;
    }

    public double getLimit() {
        return limit;
    }

    public void setLimit(double limit) {
        this.limit = limit;
    }

    public String getName() {
        return name + (gender == '男' ? "先生" : "女士");
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    public String getPassworld() {
        return passworld;
    }

    public void setPassworld(String passworld) {
        this.passworld = passworld;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }
}
